<template>
  <view>
    <uni-table :border="true" :stripe="true" :loading="loading" emptyText="暂无更多数据" >
      <!-- 表头行 -->
      <uni-tr>
        <uni-th align="center">上报时间</uni-th>
        <uni-th align="center">是否异常</uni-th>
      </uni-tr>
      <!-- 表格数据行 -->
      <uni-tr
          v-for="(item, index) in exampleList"
          :key="index"
          class="trItems"
      >
        <uni-td align="center">{{ item.time }}</uni-td>
        <uni-td align="center">{{ item.unusual }}</uni-td>
      </uni-tr>
    </uni-table>
  </view>
</template>

<script>
import { uniTable, uniTr, uniTd, uniTh } from '@dcloudio/uni-ui';

export default {
  components: {
    uniTable, uniTr, uniTd, uniTh
  },
  data() {
    return {
      loading: true,
      exampleList: [
        { time: "2021/12/01", unusual: "是" },
        { time: "2021/12/02", unusual: "是" },
        { time: "2021/12/03", unusual: "是" },
        { time: "2021/12/04", unusual: "是" },
        { time: "2021/12/05", unusual: "是" },
        { time: "2021/12/06", unusual: "是" },
        { time: "2021/12/07", unusual: "是" },
        { time: "2021/12/08", unusual: "是" },
        { time: "2021/12/09", unusual: "是" }
      ]
    }
  },
  onLoad(options) {
    let timer = setInterval(() => {
      this.loading = false;
    }, 3000);
  }
}
</script>

<style scoped>

</style>
